Repository navigation
Conversation
FunctionReporter only parsed body() of each function, so calls made in default argument values (e.g. function(x, y = helper(x))) produced no edge. Parse formals() as well, for both regular functions and R6 methods. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bburns632
force-pushed
the
fix/formals-dependencies-304
branch
from
November 16, 2026 03:05
3a0b207 to
3714990
Compare
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #304.
Problem
FunctionReporteronly parsedbody()of each function, so calls made inside default argument values produced no edge in the function network:Fix
.parse_closure()parses bothbody(fn)andformals(fn)..called_by()now uses it..determine_R6_dependencies()also parses the method'sformals(), so R6 methods with defaults likey = self$other()orx = helper()get their edges..parse_function()/.parse_R6_expression()already handleformals()output (pairlists, including arguments with no default), so the parsers themselves are unchanged.Tests
.parse_closurefinds calls in both defaults and body.called_bycreates edges for calls in default arguments (the scenario from the issue).parse_R6_expressionfinds calls in R6 method defaultsR CMD check --as-cranwithNOT_CRAN=true: 267 passed, 0 failed (263 onmain+ 4 new). No existing fixture-package expectations changed.🤖 Generated with Claude Code